package com.dzx.design.behavioral.strategy;

/**
 * @author dzx
 * @ClassName:
 * @Description: 策略模式
 * @date 2019年08月14日 11:22:47
 */
public class Test {

    public static void main(String[] args) {
//        PromotionActivity promotionActivity618 = new PromotionActivity(new LiJianPromotionStrategy());
//        PromotionActivity promotionActivity1111 = new PromotionActivity(new ManJianPromotionStrategy());
//        promotionActivity618.executePromotionStrategy();
//        promotionActivity1111.executePromotionStrategy();

        PromotionActivity promotionActivity = null;
        String promotionKey = "ASD";
        promotionActivity = new PromotionActivity(PromotionStrategyFactory.getPromotionStrategByKey(promotionKey));
        promotionActivity.executePromotionStrategy();
    }

}
